﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zhj.Community.Domain.Entitys;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace Zhj.Community.Domain.Test.Dto
{
    public class StudentEdit
    {
        public StudentEdit()
        {
            StudentFirend = new List<TestStudentFirend>();
        }

        [StringLength(500, ErrorMessage = "姓名最长为500")]
        [Required(ErrorMessage = "姓名不能为空")]
        public string Name { get; set; }

        [Range(0, 200, ErrorMessage = "年龄只能输入0到200之间")]
        public int Age { get; set; }

        public string School { get; set; }

        public List<TestStudentFirend> StudentFirend { set; get; }
    }
}
